package io.github.bloquesoft.entity.storage;

import io.github.bloquesoft.entity.definition.EntityDefinition;

import java.util.List;
import java.util.Map;

public interface PojoOperation
{
    int create(EntityDefinition entityDefinition, Object pojo);

    int update(EntityDefinition entityDefinition, Object pojo);

    int delete(EntityDefinition entityDefinition, Object id);

    Object findOne(EntityDefinition entityDefinition, Object id);

    List<Object> findList(EntityDefinition entityDefinition, Map<String, Object> criteria);
}